package com.gezi.admin.module.app.resource;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gezi.admin.module.config.BaseEntity;
import com.gezi.admin.module.app.resource.model.AppResourceAddParamModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import lombok.extern.slf4j.Slf4j;

/**
 * @Author 格子代码
 * @createDate 2024/2/10 09:00
 * @contact 1424529270@qq.com
 */
@Data
@TableName("app_resource")
@Slf4j
public class AppResourceEntity extends BaseEntity {

    @ApiModelProperty(value = "文件名")
    @TableField(value = "name")
    private String name;

    @ApiModelProperty(value = "文件连接")
    @TableField(value = "url")
    private String url;

    @ApiModelProperty(value = "备注")
    @TableField(value = "remark")
    private String remark;

    public void setData(AppResourceAddParamModel paramModel) {
        this.name = paramModel.getName();
        this.remark = paramModel.getRemark();
    }
}